/* ============================================
   DIENSTPLAN CREATOR – Design System
   Modernes, freundliches Design für Kindergarten
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
    /* Colors – Warm & Friendly */
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-surface-hover: #F1F5F9;
    --color-surface-active: #E2E8F0;
    --color-border: #E2E8F0;
    --color-border-light: #F1F5F9;
    
    --color-text: #1E293B;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;
    --color-text-inverse: #FFFFFF;
    
    --color-primary: #6366F1;
    --color-primary-light: #818CF8;
    --color-primary-dark: #4F46E5;
    --color-primary-bg: #EEF2FF;
    
    --color-success: #22C55E;
    --color-success-bg: #F0FDF4;
    --color-warning: #F59E0B;
    --color-warning-bg: #FFFBEB;
    --color-error: #EF4444;
    --color-error-bg: #FEF2F2;
    --color-info: #3B82F6;
    --color-info-bg: #EFF6FF;
    
    --color-paedagoge: #4A7DFF;
    --color-paedagoge-bg: #EBF0FF;
    --color-helfer: #22C55E;
    --color-helfer-bg: #ECFDF5;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.8125rem;
    --font-size-md: 0.9375rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 60px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--color-primary-dark);
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1E1B4B 0%, #312E81 100%);
    color: var(--color-text-inverse);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition-normal);
    overflow: hidden;
}

.sidebar-header {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.logo-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: var(--font-size-xs);
    opacity: 0.6;
    font-weight: 400;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}
.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.sidebar-nav {
    list-style: none;
    padding: var(--space-md) var(--space-sm);
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    color: rgba(255,255,255,0.7);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    font-weight: 500;
    white-space: nowrap;
}
.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}
.nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    box-shadow: inset 3px 0 0 var(--color-primary-light);
}
.nav-link svg {
    flex-shrink: 0;
    opacity: 0.8;
}
.nav-link.active svg {
    opacity: 1;
}

.sidebar-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer-text {
    font-size: var(--font-size-xs);
    opacity: 0.4;
}

/* ---- Main Content ---- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.top-bar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.today-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}
.mobile-menu-btn:hover {
    background: var(--color-surface-hover);
}

.content-wrapper {
    padding: var(--space-xl);
    max-width: 1400px;
}

/* ---- Page Header ---- */
.page-header {
    margin-bottom: var(--space-xl);
}
.page-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.page-header p {
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
    font-size: var(--font-size-md);
}
.page-header-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* ---- Cards ---- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}
.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
}
.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-fast);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--color-primary-bg); }
.stat-icon.green { background: var(--color-success-bg); }
.stat-icon.orange { background: var(--color-warning-bg); }
.stat-icon.red { background: var(--color-error-bg); }
.stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}
.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

.btn-success {
    background: var(--color-success);
    color: white;
}
.btn-success:hover:not(:disabled) {
    background: #16A34A;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--color-error);
    color: white;
}
.btn-danger:hover:not(:disabled) {
    background: #DC2626;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 0.375rem 0.625rem;
}
.btn-ghost:hover:not(:disabled) {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-md);
}
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}
.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: var(--space-md);
}
.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-surface);
    transition: all var(--transition-fast);
    outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-input::placeholder {
    color: var(--color-text-muted);
}
.form-textarea {
    min-height: 80px;
    resize: vertical;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}
.form-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}
.form-inline {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}
.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}
thead {
    background: var(--color-bg);
}
th {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: var(--color-surface-hover);
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.badge-paedagoge {
    background: var(--color-paedagoge-bg);
    color: var(--color-paedagoge);
}
.badge-helfer {
    background: var(--color-helfer-bg);
    color: var(--color-helfer);
}
.badge-success {
    background: var(--color-success-bg);
    color: #15803D;
}
.badge-warning {
    background: var(--color-warning-bg);
    color: #B45309;
}
.badge-error {
    background: var(--color-error-bg);
    color: #B91C1C;
}
.badge-info {
    background: var(--color-info-bg);
    color: #1D4ED8;
}
.badge-neutral {
    background: var(--color-surface-hover);
    color: var(--color-text-secondary);
}

/* ---- Modal ---- */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    animation: fadeIn var(--transition-fast);
}
.modal-backdrop.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 201;
    width: 90%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn var(--transition-normal);
}
.modal.active {
    display: block;
    transform: translate(-50%, -50%) scale(1);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}
.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}
.modal-body {
    padding: var(--space-xl);
}
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}
.toast {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    animation: slideInRight var(--transition-normal);
    pointer-events: all;
    min-width: 280px;
    max-width: 420px;
}
.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-error); }
.toast.warning { border-left: 4px solid var(--color-warning); }
.toast.info { border-left: 4px solid var(--color-info); }
.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.toast.fadeOut {
    animation: slideOutRight var(--transition-normal) forwards;
}

/* ---- Schedule Grid ---- */
.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}
.schedule-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.schedule-week-label {
    font-size: var(--font-size-lg);
    font-weight: 700;
    min-width: 160px;
    text-align: center;
}
.schedule-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.schedule-table {
    border-collapse: separate;
    border-spacing: 0;
}
.schedule-table th {
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 10;
    padding: var(--space-sm) var(--space-md);
}
.schedule-table .day-header {
    text-align: center;
    min-width: 180px;
}
.schedule-table .day-header .day-date {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
}
.schedule-table .employee-col {
    min-width: 180px;
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 5;
}
.schedule-table td.employee-col {
    background: var(--color-surface);
}
.schedule-table tr:hover td.employee-col {
    background: var(--color-surface-hover);
}

.employee-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.employee-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.employee-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    line-height: 1.2;
}
.employee-type-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.employee-hours-indicator {
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-top: 2px;
}
.employee-hours-indicator.ok { color: var(--color-success); }
.employee-hours-indicator.overtime { color: var(--color-error); }
.employee-hours-indicator.undertime { color: var(--color-warning); }

/* Schedule Cells */
.schedule-cell {
    padding: 4px !important;
    min-height: 60px;
    vertical-align: top;
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.schedule-cell:hover {
    background: var(--color-primary-bg) !important;
}
.schedule-cell.holiday {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(245, 158, 11, 0.05) 10px,
        rgba(245, 158, 11, 0.05) 20px
    ) !important;
}
.schedule-cell.has-warning {
    outline: 2px solid var(--color-error);
    outline-offset: -2px;
}

.schedule-entry {
    background: var(--color-primary-bg);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: var(--font-size-xs);
    margin-bottom: 2px;
    border-left: 3px solid var(--color-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}
.schedule-entry:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.schedule-entry .entry-time {
    font-weight: 700;
    color: var(--color-text);
}
.schedule-entry .entry-group {
    color: var(--color-text-secondary);
    font-size: 0.6875rem;
}
.schedule-entry .entry-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background: var(--color-error);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
}
.schedule-entry:hover .entry-delete {
    display: flex;
}

.schedule-cell-add {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 4px;
}
.schedule-cell:hover .schedule-cell-add {
    display: flex;
}
.schedule-cell-add:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-bg);
}

/* ---- Vacation Calendar ---- */
.calendar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}
.calendar-title {
    font-size: var(--font-size-md);
    font-weight: 700;
}
.calendar-nav {
    display: flex;
    gap: var(--space-xs);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}
.calendar-day-header {
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    padding: var(--space-sm) 0;
    text-transform: uppercase;
}
.calendar-day {
    text-align: center;
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.calendar-day:hover {
    background: var(--color-surface-hover);
}
.calendar-day.today {
    background: var(--color-primary);
    color: white;
    font-weight: 700;
}
.calendar-day.other-month {
    color: var(--color-text-muted);
    opacity: 0.5;
}
.calendar-day.holiday {
    color: var(--color-error);
    font-weight: 600;
}
.calendar-day.vacation {
    background: var(--color-info-bg);
    color: var(--color-info);
    font-weight: 600;
}
.calendar-day.weekend {
    color: var(--color-text-muted);
}
.calendar-day.current-week {
    background: var(--color-primary-bg);
}

/* ---- Warnings Panel ---- */
.warnings-panel {
    margin-top: var(--space-lg);
}
.warning-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xs);
}
.warning-item.error {
    background: var(--color-error-bg);
    color: #991B1B;
}
.warning-item.warning {
    background: var(--color-warning-bg);
    color: #92400E;
}
.warning-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---- Vacation List ---- */
.vacation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-fast);
}
.vacation-item:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}
.vacation-dates {
    font-weight: 600;
    font-size: var(--font-size-sm);
}
.vacation-days-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

/* ---- Hours Display ---- */
.hours-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 4px;
}
.hours-bar-track {
    flex: 1;
    height: 6px;
    background: var(--color-surface-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.hours-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}
.hours-bar-fill.ok { background: var(--color-success); }
.hours-bar-fill.overtime { background: var(--color-error); }
.hours-bar-fill.undertime { background: var(--color-warning); }
.hours-bar-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--color-text-muted);
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}
.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}
.empty-state-text {
    font-size: var(--font-size-sm);
    max-width: 400px;
    margin: 0 auto var(--space-md);
}

/* ---- Grid Layouts ---- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* ---- Utility ---- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .content-wrapper {
        padding: var(--space-md);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .schedule-header {
        flex-direction: column;
        align-items: stretch;
    }
    .page-header h1 {
        font-size: var(--font-size-xl);
    }
}

/* ---- Print Styles ---- */
@media print {
    body {
        background: white;
        font-size: 10pt;
    }
    .sidebar,
    .top-bar,
    .mobile-menu-btn,
    .btn,
    .toast-container,
    .modal,
    .modal-backdrop,
    .schedule-cell-add,
    .entry-delete,
    .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
    .content-wrapper {
        padding: 0;
        max-width: 100%;
    }
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        break-inside: avoid;
    }
    .schedule-table th,
    .schedule-table td {
        border: 1px solid #ccc;
    }
    .page-header {
        text-align: center;
        margin-bottom: 15px;
    }
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
    }
    .print-header h1 {
        font-size: 16pt;
        margin-bottom: 4px;
    }
    .print-header p {
        font-size: 10pt;
        color: #666;
    }
    @page {
        size: A4 landscape;
        margin: 1cm;
    }
}
.print-header {
    display: none;
}

/* ---- Color dot for groups ---- */
.color-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    display: inline-block;
    flex-shrink: 0;
}
.color-dot-lg {
    width: 16px;
    height: 16px;
}

/* ---- Settings page ---- */
.settings-section {
    margin-bottom: var(--space-xl);
}
.settings-section h3 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

/* ---- Loading spinner ---- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Tooltip ---- */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 50;
}
[data-tooltip]:hover::after {
    opacity: 1;
}

/* ---- Copy Schedule Modal ---- */
.copy-schedule-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.copy-schedule-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ---- Dashboard Today List ---- */
.today-list {
    list-style: none;
}
.today-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--font-size-sm);
}
.today-list li:last-child {
    border-bottom: none;
}
